package com.origin.oss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.data.annotation.Id;

/**
 * 文件上传任务详情
 *
 * @author origin
 * @date 2024/2/5 13:09
 */
@TableName("file_upload_task_detail")
@Data
public class FileUploadTaskDetail {

    @Id
    @TableId(value = "upload_task_detail_id", type = IdType.AUTO)
    private Long uploadTaskDetailId;

    @TableField("upload_task_id")
    private Long uploadTaskId;

    /**
     * 上传状态, 1 - 成功, 0 - 失败, 2 - 未完成
     */
    @TableField("upload_state")
    private Integer uploadState;

    /**
     * 文件路径, 上传失败重试时用
     */
    @TableField("file_path")
    private String filePath;

    /**
     * 当前分片数
     */
    @TableField("chunk_number")
    private int chunkNumber;

    /**
     * 当前分片大小
     */
    @TableField("chunk_size")
    private Integer chunkSize;

}
